{% extends "base.html" %}

{% block title %}登录{% endblock %}

{% block content %}
<div class="auth-container">
    <div class="auth-card">
        <h2>用户登录</h2>
        
        {% if error %}
        <div class="error-message">{{ error }}</div>
        {% endif %}
        
        <form method="POST">
            <div class="form-group">
                <label>用户名：</label>
                <input type="text" name="username" required>
            </div>
            <div class="form-group">
                <label>密码：</label>
                <input type="password" name="password" required>
            </div>
            <button type="submit" class="btn">登录</button>
        </form>
        
        <p class="auth-link">
            没有账号？ <a href="{{ url_for('register') }}">立即注册</a>
        </p>
        
        <div class="test-accounts">
            <h4>测试账号：</h4>
            <p>用户名: test 密码: 123456</p>
            <p>用户名: student1 密码: 123456</p>
        </div>
    </div>
</div>
{% endblock %}